package com.example.demo.controller;

import com.example.demo.service.zuoerFeignService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class zuoerFeignController {

    /**
     * 如果这里编译器报错，无视。
     * 因为这个Bean是在程序启动的时候注入的，编译器是无法感知的，所以报错
     * 不会影响程序的进行
     */
    @Autowired
    zuoerFeignService zuoerFeignService;

    @GetMapping(value = "/hello")
    public String sayHello(@RequestParam String name) {
        System.out.println("sayHello");
        return zuoerFeignService.sayHelloFromClientOne( name );
    }

}
